﻿using System;
using System.Collections.Generic;
using System.Text;

namespace SmartSiteManagementSystem.Models.ProjectManage
{
    /// <summary>
    /// 
    /// </summary>
    [Serializable]
    public class DayProjectInfo
    {
 
        /// <summary>
        /// 日计划 自增ID 
        /// </summary>
        private int _dayProjectId;

        public int DayProjectId
        {
            get { return _dayProjectId; }
            set { _dayProjectId = value; }

        }


        /// <summary>
        /// 项目计划ID
        /// </summary>
        private int _projectId;

        public int ProjectId
        {
            get { return _projectId; }
            set { _projectId = value; }

        }


        /// <summary>
        /// 日计划名字
        /// </summary>
        private string _dayProjectName;

        public string DayProjectName
        {
            get { return _dayProjectName; }
            set { _dayProjectName = value; }

        }

        /// <summary>
        /// 日计划类型 
        /// </summary>
        private int _dayProjectType;

        public int DayProjectType
        {
            get { return _dayProjectType; }
            set { _dayProjectType = value; }

        }



                /// <summary>
        /// 计划状态
        /// </summary>
        private int _statusType;

        public int StatusType
        {
            get { return _statusType; }
            set { _statusType = value; }

        }

  


        private DateTime _startTime;

        /// <summary>
        /// 项目开始时间
        /// </summary>
        public DateTime StartTime
        {
            set { _startTime = value; }
            get { return _startTime; }
        }


        private DateTime _endTime;

        /// <summary>
        /// 项目结束时间
        /// </summary>
        public DateTime EndTime
        {
            set { _endTime = value; }
            get { return _endTime; }
        }

        /// <summary>
        /// 是否下发  1 已发 0 未发
        /// </summary>
        private bool _isIssue;

        public bool IsIssue
        {
            get { return _isIssue; }
            set { _isIssue = value; }

        }

        private DateTime _issuetime;

        /// <summary>
        /// 下发时间
        /// </summary>
        public DateTime IssueTime
        {
            set { _issuetime = value; }
            get { return _issuetime; }
        }


        /// <summary>
        /// 计划分配用户
        /// </summary>
        private int _userId;

        public int UserId
        {
            get { return _userId; }
            set { _userId = value; }

        }

        private DateTime _assigntime;

        /// <summary>
        /// 分配时间
        /// </summary>
        public DateTime AssignTime
        {
            set { _assigntime = value; }
            get { return _assigntime; }
        }



        private DateTime _completetime;

        /// <summary>
        /// 分配时间
        /// </summary>
        public DateTime CompleteTime
        {
            set { _completetime = value; }
            get { return _completetime; }
        }

        /// <summary>
        /// 是否删除 逻辑删  1 删除 0 
        /// </summary>
        private bool _isDelete;

        public bool IsDelete
        {
            get { return _isDelete; }
            set { _isDelete = value; }

        }

        private DateTime _createtime;

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime
        {
            set { _createtime = value; }
            get { return _createtime; }
        }

        private DateTime _updatetime;
        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime UpdateTime
        {
            set { _updatetime = value; }
            get { return _updatetime; }
        }


        #region 虚拟字段

        public string DayProjectTypeName{ set;get;}

        public string StatusTypeStr { set; get; }

        public string UserStr { set; get; }

        public string StartTimeStr
        {
            get { return this.StartTime.ToString("yyyy-MM-dd HH:mm:ss"); }
            
        }

        public string EndTimeStr
        {
            get { return this.EndTime.ToString("yyyy-MM-dd HH:mm:ss"); }

        }

    
        public string IssueTimeStr
        {
            get
            {
                if (_isIssue)
                {
                    return this.IssueTime.ToString("yyyy-MM-dd HH:mm:ss");
                }
                else
                {
                    return "--";
                }
            }
           
        }

        public string CreateTimeStr
        {
            get { return this.CreateTime.ToString("yyyy-MM-dd HH:mm:ss"); }

        }


        /// <summary>
        /// 
        /// </summary>
        private string issueStr;
        public string IssueStr
        {
            get {
                if (_isIssue == true)
                {
                    return "是";
                }
                else
                {
                    return "否";
                }
            }
        }

        #endregion
    }
}
